<template>
  <div class="banner">
    <swiper ref="mySwiper" :options="swiperOptions" class="swiper">
      <swiper-slide>Slide 1</swiper-slide>
      <swiper-slide>Slide 2</swiper-slide>
      <swiper-slide>Slide 1</swiper-slide>
      <swiper-slide>Slide 4</swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
import "swiper/css/swiper.min.css";
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
export default {
  name: "carrousel",
  components: {
    Swiper,
    SwiperSlide,
  },
  data() {
    return {
      swiperOptions: {
        pagination: {
          el: ".swiper-pagination",
          clickable:true
        },
           autoplay: {
            delay: 2000,
            disableOnInteraction: false,
            simulaeTouch:false
          },
        // Some Swiper option/callback...
      },
    };
  },
  computed: {
    swiper() {
      return this.$refs.mySwiper.$swiper;
    },
  },
  mounted() {
    console.log("Current Swiper instance object", this.swiper);
    this.swiper.slideTo(0, 1000, false);
  },
};
</script>
<style>
.swiper {
  width: 100%;
  height: 592px;
}

swiper-slide {
  width: 100%;
  height: 600px;
}

.swiper-pagination-bullet {
  width: 21px;
  height: 21px;
  color: #000;
  opacity: 1;
  background: #0096f6;
  margin-left: 50px !important;
}
.swiper-pagination-bullet-active {
  background: #0096f6;
  /* width: 85px; */
  padding: 0 32px;
  height: 21px;
  border-radius: 5px;
}
</style>